package com.kaibes.orm.spring.jdbc;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

import com.kaibes.orm.core.dialect.Dialect;

public class MySqlCondition implements Condition {

    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        try {
            context.getBeanFactory().getBean(Dialect.class);
            return false;
        } catch (Exception e) {
            return true;
        }
    }

}
